﻿using Hetang.Areas.User.Models.Classes;
using Hetang.Models.Config;
using Hetang.Models.Interface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace Hetang.Models.Repository
{
    public class ConfigRepository : IConfigRepository
    {
        /// <summary>
        /// 获取公司行业列表
        /// </summary>
        /// <returns>List<SelectListItem></returns>
        List<SelectListItem> IConfigRepository.GetCompanyTrade()
        {
            return Hetang.Models.Helper.JsonHelper.parse<List<SelectListItem>>(System.IO.File.ReadAllText(HttpContext.Current.Server.MapPath("~/Models/Config/Database/Company_Trade.txt")));
        }

        /// <summary>
        /// 获取简历户籍
        /// </summary>
        /// <returns>List<dt_Domicile_City></returns>
        List<dt_Domicile_City> IConfigRepository.GetResumeDomicile()
        {
            return Hetang.Models.Helper.JsonHelper.parse<List<dt_Domicile_City>>(System.IO.File.ReadAllText(HttpContext.Current.Server.MapPath("~/Models/Config/Database/Resume_Domicile.txt")));
        }

        /// <summary>
        /// 获取英文证书列表
        /// </summary>
        /// <returns></returns>
        List<SelectListItem> IConfigRepository.GetPersonEnglistList()
        {
            return Hetang.Models.Helper.JsonHelper.parse<List<SelectListItem>>(System.IO.File.ReadAllText(HttpContext.Current.Server.MapPath("~/Models/Config/Database/Person_Englist_List.txt")));
        }
    }
}